﻿package main

import "fmt"

func is_narcissistic(a int) {
    if a < 99 || a > 1000{
        fmt.Println(a, "超出范围")
        return
    }
    var n1, n2, n3 int
    n1 = a % 10
    n2 = a / 10 % 10
    n3 = a / 100 % 10
    sum := n1*n1*n1 + n2*n2*n2 + n3*n3*n3
    if sum == a{
        fmt.Println(a, n3, n2, n1)
    }
}

func main(){
    for i := 100; i < 1000; i++ {
        is_narcissistic(i)
    }
}